package com.znsd.exam.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.znsd.entitys.Subjectinfo;
import com.znsd.exam.dao.SubjectDao;
import com.znsd.exam.service.SubjectService;

@Service
public class SubjectServiceImpl implements SubjectService{
	
	@Autowired
	private SubjectDao subjectInfoMapper;
	
	@Override
	public List<Subjectinfo> getSubjects(Map<String, Object> map) {
		return subjectInfoMapper.subjectList(map);
	}

	@Override
	public int getSubjectTotal() {
		return subjectInfoMapper.getSubjectTotal();
	}

	@Override
	public int addSucjects(Subjectinfo subject) {
		return subjectInfoMapper.addSucjects(subject);
	}

	@Override
	public int delSubject(Integer subjectId) {
		return subjectInfoMapper.delSubject(subjectId);
	}

	@Override
	public Subjectinfo getSubjectWithId(Integer subjectId) {
		return subjectInfoMapper.getSubjectWithId(subjectId);
	}

	@Override
	public int updateSubject(Subjectinfo subject) {
		return subjectInfoMapper.updateSubject(subject);
	}

	@Override
	public List<Subjectinfo> kcSubList(Integer id, Integer page, Integer rows) {
		// TODO Auto-generated method stub
		return subjectInfoMapper.kcSubList(id, page, rows);
	}

	@Override
	public long kcSubCount(Integer id) {
		// TODO Auto-generated method stub
		return subjectInfoMapper.kcSubCount(id);
	}

	@Override
	public List<Subjectinfo> ctList(Integer id) {
		// TODO Auto-generated method stub
		return subjectInfoMapper.ctList(id);
	}
}
